package com.ruoyi.core.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 积分抽奖奖品配置对象 lottery_config
 * 
 * @author Sxz
 * @date 2025-08-07
 */
public class LotteryConfig extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 奖品配置ID */
    private Long id;

    /** 商品ID（仅 prize_type=3 时关联商品SKU） */
    @Excel(name = "商品ID", readConverterExp = "仅=,p=rize_type=3,时=关联商品SKU")
    private Long productId;

    /** 优惠券ID（仅 prize_type=2 时有效） */
    @Excel(name = "优惠券ID", readConverterExp = "仅=,p=rize_type=2,时=有效")
    private Long couponId;

    /** 奖品名称 */
    @Excel(name = "奖品名称")
    private String prizeName;

    /** 奖品类型：1-积分 2-优惠券 3-实物 4-谢谢参与 */
    @Excel(name = "奖品类型：1-积分 2-优惠券 3-实物 4-谢谢参与")
    private Long prizeType;

    /** 积分奖励（仅 prize_type=1 时有效） */
    @Excel(name = "积分奖励", readConverterExp = "仅=,p=rize_type=1,时=有效")
    private Long pointsReward;

    /** 奖品库存数量 */
    @Excel(name = "奖品库存数量")
    private Long stock;

    /** 中奖概率（0-1） */
    @Excel(name = "中奖概率", readConverterExp = "0=-1")
    private Long probability;

    /** 状态：1-启用 0-禁用 */
    @Excel(name = "状态：1-启用 0-禁用")
    private Long status;

    /** 配置创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "配置创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setProductId(Long productId) 
    {
        this.productId = productId;
    }

    public Long getProductId() 
    {
        return productId;
    }

    public void setCouponId(Long couponId) 
    {
        this.couponId = couponId;
    }

    public Long getCouponId() 
    {
        return couponId;
    }

    public void setPrizeName(String prizeName) 
    {
        this.prizeName = prizeName;
    }

    public String getPrizeName() 
    {
        return prizeName;
    }

    public void setPrizeType(Long prizeType) 
    {
        this.prizeType = prizeType;
    }

    public Long getPrizeType() 
    {
        return prizeType;
    }

    public void setPointsReward(Long pointsReward) 
    {
        this.pointsReward = pointsReward;
    }

    public Long getPointsReward() 
    {
        return pointsReward;
    }

    public void setStock(Long stock) 
    {
        this.stock = stock;
    }

    public Long getStock() 
    {
        return stock;
    }

    public void setProbability(Long probability) 
    {
        this.probability = probability;
    }

    public Long getProbability() 
    {
        return probability;
    }

    public void setStatus(Long status) 
    {
        this.status = status;
    }

    public Long getStatus() 
    {
        return status;
    }

    public void setCreatedAt(Date createdAt) 
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() 
    {
        return createdAt;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("productId", getProductId())
            .append("couponId", getCouponId())
            .append("prizeName", getPrizeName())
            .append("prizeType", getPrizeType())
            .append("pointsReward", getPointsReward())
            .append("stock", getStock())
            .append("probability", getProbability())
            .append("status", getStatus())
            .append("createdAt", getCreatedAt())
            .toString();
    }
}
